<div class="inside">
  <aside class="navigationPanel">
     
     <div class="tree pagesLinks">
        <ul>
           <ul>
			<li> <a href="<?php echo $baseurl.'campaign/sua-modem/'.$id.'.html'?>" class="active"><i class="fa fa-star"></i>Sửa modem</a> </li>
			<li> <a href="<?php echo $baseurl.'campaign/modem.html'?>"><i class="fa fa-star"></i> Danh sách modem</a> </li>
              <li> <a href="<?php echo $baseurl.'campaign/dia-diem.html'?>" class=""><i class="fa fa-star"></i> Địa điểm</a> </li>
			  <li> <a href="<?php echo $baseurl.'campaign/tat-ca.html'?>"><i class="fa fa-star"></i> Tất cả chiến dịch</a> </li>
              <li> <a href="<?php echo $baseurl.'campaign/cho-duyet.html'?>"><i class="fa fa-star"></i> Chiến dịch chờ duyệt</a> </li>
              <li> <a href="<?php echo $baseurl.'campaign/dang-chay.html'?>"><i class="fa fa-star"></i> Chiến dịch đang chạy</a> </li>
			  <li> <a href="<?php echo $baseurl.'campaign/dang-tam-dung.html'?>"><i class="fa fa-star"></i> Chiến dịch đang tạm dừng</a></li>
			  <li> <a href="<?php echo $baseurl.'campaign/da-huy.html'?>"><i class="fa fa-star"></i> Chiến dịch đã hủy</a> </li>
           </ul>
        </ul>
     </div>
  </aside>
  <div class="contentPanel">
     <div class="pages" id="profile">
        <div class="profile-edit-form">
              <?php $att = array('id' => 'frm-profileEdit-editForm', 'class' => 'profileForm');echo form_open('', $att);?>
              <div class="contentBox switcher" style="height: 100%;">
                 <h3>Sửa modem</h3>
                 <?php if(validation_errors()):?>
                    <h4>
                        <p><?php echo validation_errors(); ?></p>
                    </h4>
                    <?php endif;?>
                 <div class="contentSwitcher hide" style="display: block;">
                    <div class="insideContentBox">
                      
                       <label for="frm-fullname">Tên modem (*):</label> 
                       <input type="text" name="name" value="<?php echo $getModemInfo->name;?>" class="ipt" autocomplete="off" id="frm-username" placeholder="Tên modem">
					   
                       <label for="frm-fullname">NAS ID (*):</label> 
                       <input type="text" name="nas_id" value="<?php echo $getModemInfo->nas_id;?>" class="ipt" autocomplete="off" id="frm-address" placeholder="NAS ID">
                       <div class="lineButton">
                           <button type="submit" class="applyBtn btn btn-small btn-primary"><span>Lưu lại</span></button>
                           <button type="button" onclick="window.location='<?php echo $baseurl.'campaign/modem.html'?>'" class="cancelBtn btn btn-default btn-small"><span>Hủy bỏ</span></button>
                       </div>
                    </div>
                 </div>
              </div>
           </form>
        </div>
     </div>
  </div>
</div> 
<script>

$(function()
{
    $("#level").on('change', function()
    {
        var id = $(this).val();
        if(id == 3)
        {
            $.ajax({
               type: 'get',
               beforeSend: function()
               {
                    $("#list-agency").show(); $("#list-place").hide();
               },
               url: '<?php echo site_url()?>get-agency-ajax',
               success: function(data)
               {
                    $("#content-list-agency").html(data);
               }
            });
        }else{
			if(id == 4)
			{
				$.ajax({
				   type: 'get',
				   beforeSend: function()
				   {
						$("#list-place").show(); $("#list-agency").hide();
				   },
				   url: '<?php echo site_url()?>get-place-ajax',
				   success: function(data)
				   {
						$("#content-list-place").html(data);
				   }
				});
			}else{
				$("#list-agency").hide(); $("#list-place").hide();
				$input = '<input name="agency" value="xx" type="hidden"/>'; $input_ = '<input name="place" value="xx" type="hidden"/>';
				$("#content-list-agency").html($input); $("#content-list-place").html($input_);
			}
        }
    })    
});

function convertimage(id, id_parse, img_show, check_image)
{
    var id = id;
    var id_parse = id_parse;
    var img_show = img_show;
    var check_image = check_image;
    var filesSelected = document.getElementById(id).files;
    if (filesSelected.length > 0)
    {
        var fileToLoad = filesSelected[0];

        var fileReader = new FileReader();

        fileReader.onload = function(fileLoadedEvent) 
        {
            $("#"+id_parse).attr('value', fileLoadedEvent.target.result);
            $("#"+check_image).val('1');
            //document.getElementById('cddd').html(fileLoadedEvent.target.result);
            $("#"+img_show).attr('src', fileLoadedEvent.target.result);
        };

        fileReader.readAsDataURL(fileToLoad);
    }
}
/*function convertimage()
{
    
        var filesSelected = document.getElementById("frm-img").files;
        if (filesSelected.length > 0)
        {
            var fileToLoad = filesSelected[0];
    
            var fileReader = new FileReader();
    
            fileReader.onload = function(fileLoadedEvent) 
            {
                var textAreaFileContents = document.getElementById
                (
                    "textAreaFileContents"
                    );
                $("#img_hd").attr('value', fileLoadedEvent.target.result);
            };
    
            fileReader.readAsDataURL(fileToLoad);
        }
    
    
    
}*/
</script>
<style>
body.flash-permanent .contentPanel {
    padding: 100px 0px 18px !important;
}
.cfr {
    line-height: 1px !important;padding: 15px 79px 0px 12px !important;height: 37px !important;
}
</style>